function createLogoManagePanel() {
	
	var logoManagePanel = Ext.create("Ext.panel.Panel", {
		
		id: 'logo-panel',
		
		title: "Logo 设定",
		
		bodyPadding: '10 50 0 50',
		
		layout: 'vbox',
		
		items: [{
			xtype: 'label',
			text: '正在使用的Logo:',
			margins: '10 0 10 10'
		}, {
			xtype: 'box',
			border: 1,
		    style: {borderColor:'#e6e6e6', borderStyle:'solid', borderWidth:'1px'},
			width: 406,
			height: 113,
			autoEl : {
				tag : 'img',
				width: 406,
				height: 113,
				src : "img/big-logo.png",
				complete:'off'
            }
		}, {
			xtype: 'label',
			text: '预览图:',
			margins: '10 0 10 10'
		}, {
			xtype: 'box',
			border: 1,
		    style: {borderColor:'#e6e6e6', borderStyle:'solid', borderWidth:'1px'},
			width: 406,
			height: 113,
			autoEl : {
				tag : 'img',
				width: 406,
				height: 113,
				src : Ext.BLANK_IMAGE_URL,
				complete:'off',
				id : 'imageBrowse'
            }
		}, Ext.create("Ext.form.Panel", {
			width: 350,
			height: 70,
			border: false,
			defaultType: 'textfield',
			layout: "hbox",
			margins: "20 0 0 0",
		    items: [{
		    	xtype: 'filefield',
	            name: 'logoImg',
	            fieldLabel: '更换图片',
	            labelWidth: 60,
	            msgTarget: 'side',
	            width: 300,
	            allowBlank: false,
	            buttonText: '浏览...'
		    }, {
		    	xtype: "button",
		    	text: "预览",
		    	margins: "0 0 0 10",
		    	handler: function() {
		    		
		    	}
		    }],

		    buttons: [{
		        text: '重置',
		        handler: function() {
		            this.up('form').getForm().reset();
		        }
		    }, {
		        text: '提交上传',
		        formBind: true, //only enabled once the form is valid
		        disabled: true,
		        handler: function() {
		            var form = this.up('form').getForm();
		            if (form.isValid()) {
		            	/*
		                form.submit({
		                    success: function(form, action) {
		                       Ext.Msg.alert('Success', action.result.msg);
		                    },
		                    failure: function(form, action) {
		                        Ext.Msg.alert('Failed', action.result.msg);
		                    }
		                });
		                */
		            }
		        }
		    }]
		})]
	});
	
	return logoManagePanel;
}

function createQuickLinkPanel() {
	var quickLinkPanel = Ext.create("Ext.panel.Panel", {
		
		id: 'quicklink-panel',
		
		title: "Quick Link 设定",
		
		bodyPadding: '30 50 0 50',
		
		layout: 'vbox',
		
		items: [{
			xtype: "form",
			border: false,
			width: 600,
			layout: "hbox",
			margins: "0 0 20 0",
			items: [{
				xtype: "label",
				text: "设定",
				margins: "10 10 0 0"
			}, {
				xtype: "box",
				autoEl : {
					tag : 'img',
					width: 99,
					height: 36,
					src : "img/quicklink-1.gif",
					complete:'off'
	            }
			}, {
				xtype: "label",
				text: "点击后链接到:",
				margins: "10 0 0 0"
			}, {
				xtype: "textfield",
				width: 300,
				name: "quicklink-1",
				allowBlank: false,
				msgTarget: 'side',
				margins: "7 10 0 10",
				value: "http://"
			}, {
				xtype: "button",
				text: "设定",
				margins: "7 10 0 10",
				handler: function() {
					
				}
			}]
		}, {
			xtype: "form",
			border: false,
			width: 600,
			layout: "hbox",
			margins: "0 0 20 0",
			items: [{
				xtype: "label",
				text: "设定",
				margins: "10 10 0 0"
			}, {
				xtype: "box",
				autoEl : {
					tag : 'img',
					width: 99,
					height: 36,
					src : "img/quicklink-2.gif",
					complete:'off'
	            }
			}, {
				xtype: "label",
				text: "点击后链接到:",
				margins: "10 0 0 0"
			}, {
				xtype: "textfield",
				width: 300,
				name: "quicklink-2",
				allowBlank: false,
				msgTarget: 'side',
				margins: "7 10 0 10",
				value: "http://"
			}, {
				xtype: "button",
				text: "设定",
				margins: "7 10 0 10",
				handler: function() {
					
				}
			}]
		}, {
			xtype: "form",
			border: false,
			width: 600,
			layout: "hbox",
			items: [{
				xtype: "label",
				text: "设定",
				margins: "10 10 0 0"
			}, {
				xtype: "box",
				autoEl : {
					tag : 'img',
					width: 99,
					height: 36,
					src : "img/quicklink-3.gif",
					complete:'off'
	            }
			}, {
				xtype: "label",
				text: "点击后链接到:",
				margins: "10 0 0 0"
			}, {
				xtype: "textfield",
				width: 300,
				name: "quicklink-3",
				allowBlank: false,
				msgTarget: 'side',
				margins: "7 10 0 10",
				value: "http://"
			}, {
				xtype: "button",
				text: "设定",
				margins: "7 10 0 10",
				handler: function() {
					
				}
			}]
		}]
		
		
	});
	
	return quickLinkPanel;
}

function createImageLinkPanel() {
	
	var dataStore = Ext.create('Ext.data.Store', {
	    storeId:'imgLinkOptionStore',
	    fields:['id', 'name'],
	    data:{'items':[
	       	        { "id": 1, "name":"第一个"},   
	       	        { "id": 2, "name":"第二个"},
	       	        { "id": 3, "name":"第三个"},
	       	        { "id": 4, "name":"第四个"}
	       	    ]},
	    proxy: {
	        type: 'memory',
	        reader: {
	            type: 'json',
	            root: 'items'
	        }
	    }
	});
	
	var imageLinkPanel = Ext.create("Ext.panel.Panel", {
		
		id: 'imagelink-panel',
		
		title: "首页 图片链接 设定",
		
		bodyPadding: '30 50 0 50',
		
		layout: 'vbox',
		
		items: [{
			xtype: "panel",
			border: false,
			width: 600,
			layout: "hbox",
			margins: "0 0 20 0",
			items: [{
				xtype: "box",
				margins: "0 0 0 0",
				autoEl : {
					tag : 'img',
					width: 106,
					height: 102,
					src : "img/img-link1.gif",
					complete:'off'
					
	            }
			}, {
				xtype: "box",
				margins: "0 0 0 10",
				autoEl : {
					tag : 'img',
					width: 106,
					height: 102,
					src : "img/img-link2.gif",
					complete:'off'
	            }
			},{
				xtype: "box",
				margins: "0 0 0 10",
				autoEl : {
					tag : 'img',
					width: 106,
					height: 102,
					src : "img/img-link3.gif",
					complete:'off'
	            }
			},{
				xtype: "box",
				margins: "0 0 0 10",
				autoEl : {
					tag : 'img',
					width: 106,
					height: 102,
					src : "img/img-link4.gif",
					complete:'off'
	            }
			}]
		}, {
			xtype: "form",
			border: false,
			//style: {borderColor:'#e6e6e6', borderStyle:'solid', borderWidth:'1px'},
			layout: "border",
			width: 370,
			height: 280,
			items: [{
				xtype: "panel",
				border: false,
				region: "west",
				layout: "vbox",
				width: 110,
				height: 140,
				items: [{
					xtype: "label",
					text: "预览图"
				}, {
					xtype: "box",
					width: 106,
					height: 102,
					border: 1,
					style: {borderColor:'#e6e6e6', borderStyle:'solid', borderWidth:'1px'}
				}]
			}, {
				xtype: "panel",
				border: false,
				region: 'center',
				layout: "hbox",
				width: 300,
				height: 140,
				bodyPadding: "90 0 0 0",
				items:[{
					xtype: "label",
					text: "设定",
					margins: "0 0 0 10"
				}, {
					xtype: "combo",
					queryMode: 'local',
				    displayField: 'name',
				    valueField: 'id',
				    store: dataStore,
				    margins: "0 0 0 5"
				}]
			}, {
				xtype:"panel",
				region: "south",
				layout: "vbox",
				border: false,
				width: 370,
				height: 120,
				items: [{
					xtype: "panel",
					border: false,
					layout: "hbox",
					width: 370,
					height: 60,
					items: [{
				    	xtype: 'filefield',
			            name: 'imageLinkImg',
			            fieldLabel: '更换图片',
			            labelWidth: 60,
			            msgTarget: 'side',
			            width: 300,
			            allowBlank: false,
			            buttonText: '浏览...'
				    }, {
				    	xtype: "button",
				    	text: "预览",
				    	margins: "0 0 0 10",
				    	handler: function() {
				    		
				    	}
				    }]
				}, {
					xtype: "panel",
					border: false,
					layout: "vbox",
					width: 440,
					height: 60,
					items: [{
						xtype: "label",
						text: "点击后链接到商品页面时的关键字:",
						margins: "10 0 0 0"
					}, {
						xtype: "textfield",
						width: 300,
						name: "quicklink-2",
						allowBlank: false,
						msgTarget: 'side',
						margins: "7 10 0 0"
					}]
				}]
			}], 
			
			buttons: [{
		        text: '重置',
		        handler: function() {
		            this.up('form').getForm().reset();
		        }
		    }, {
		        text: '设定生效',
		        formBind: true, //only enabled once the form is valid
		        disabled: true,
		        handler: function() {
		            var form = this.up('form').getForm();
		            if (form.isValid()) {
		            	/*
		                form.submit({
		                    success: function(form, action) {
		                       Ext.Msg.alert('Success', action.result.msg);
		                    },
		                    failure: function(form, action) {
		                        Ext.Msg.alert('Failed', action.result.msg);
		                    }
		                });
		                */
		            }
		        }
		    }]
		}]
		
		
	});
	
	return imageLinkPanel;
}

function createHotLinkPanel() {
	
	var dataStore = Ext.create('Ext.data.Store', {
	    storeId:'hotLinkOptionStore',
	    fields:['id', 'name'],
	    data:{'items':[
	       	        { "id": 1, "name":"第一个"},   
	       	        { "id": 2, "name":"第二个"},
	       	        { "id": 3, "name":"第三个"},
	       	        { "id": 4, "name":"第四个"},
	       	        { "id": 5, "name":"第五个"}
	       	    ]},
	    proxy: {
	        type: 'memory',
	        reader: {
	            type: 'json',
	            root: 'items'
	        }
	    }
	});
	
	var catagoryStore = Ext.create('Ext.data.Store', {
	    storeId:'hotLinkCatagoryStore',
	    fields:['id', 'name'],
	    data:{'items':[
	       	        { "id": 1, "name":"单车"},   
	       	        { "id": 2, "name":"书"},
	       	        { "id": 3, "name":"内存"},
	       	        { "id": 4, "name":"手机"},
	       	        { "id": 5, "name":"硬件"}
	       	    ]},
	    proxy: {
	        type: 'memory',
	        reader: {
	            type: 'json',
	            root: 'items'
	        }
	    }
	});
	
	var hotLinkPanel = Ext.create("Ext.panel.Panel", {
		
		id: 'hotlink-panel',
		
		title: "首页 热门搜索 设定",
		
		bodyPadding: '30 50 0 50',
		
		layout: 'vbox',
		
		items: [{
			xtype: "panel",
			border: false,
			width: 600,
			layout: "hbox",
			margins: "0 0 20 0",
			items: [{
				xtype: "box",
				widht: 600,
				height: 50,
				html: '<div class="text-link-div">' +
						'<table class="text-link-table"><tr>' +
						'<td><img src="img/text-link-title.gif"/></td>' +
						'<td><a href="index.html">二手书籍</a></td>' +
						'<td><a href="#">单车</a></td>' +
						'<td><a href="#">Android</a></td>' +
						'<td><a href="#">风扇</a></td>' +
						'<td><a href="#">KTV优惠券</a></td>' +
						'</tr></table></div>'
			}]
		}, {
			xtype: "form",
			border: false,
			//style: {borderColor:'#e6e6e6', borderStyle:'solid', borderWidth:'1px'},
			width: 440,
			height: 210,
			items: [{
				xtype: "combo",
				fieldLabel: "设定",
				queryMode: 'local',
				labelWidth: 60,
			    displayField: 'name',
			    valueField: 'id',
			    store: dataStore,
			    margins: "0 0 0 5",
			    allowBlank: false
			}, {
		    	xtype: 'textfield',
	            name: 'text',
	            fieldLabel: '更换文字',
	            labelWidth: 60,
	            msgTarget: 'side',
	            width: 300,
	            allowBlank: false
			}, {
				xtype: "panel",
				border: false,
				layout: "vbox",
				width: 440,
				height: 120,
				items: [{
					xtype: "label",
					text: "点击后链接到商品页面时的设定:",
					margins: "10 0 0 0"
				}, {
					xtype: "combo",
					fieldLabel: '类别',
					labelWidth: 60,
					width: 200,
					store: catagoryStore,
					allowBlank: false,
					displayField: 'name',
				    valueField: 'id',
					msgTarget: 'side',
					margins: "7 10 0 0"
				}, {
					xtype: "textfield",
					fieldLabel: '关键字',
					labelWidth: 60,
					width: 440,
					allowBlank: false,
					msgTarget: 'side',
					margins: "7 10 0 0"
				}]
			}], 
			
			buttons: [{
		        text: '重置',
		        handler: function() {
		            this.up('form').getForm().reset();
		        }
		    }, {
		        text: '设定生效',
		        formBind: true, //only enabled once the form is valid
		        disabled: true,
		        handler: function() {
		            var form = this.up('form').getForm();
		            if (form.isValid()) {
		            	/*
		                form.submit({
		                    success: function(form, action) {
		                       Ext.Msg.alert('Success', action.result.msg);
		                    },
		                    failure: function(form, action) {
		                        Ext.Msg.alert('Failed', action.result.msg);
		                    }
		                });
		                */
		            }
		        }
		    }]
		}]
		
		
	});
	
	return hotLinkPanel;
}

